<!DOCTYPE html>
<html>
  <head>
    <title>pic.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript">
  
  		function setImage(){
  			var value = document.getElementById("url").value;
  			//var imgHtml = '<img alt="" src="http://t2.baidu.com/it/u=2,819517188&fm=19&gp=0.jpg" height="200" width="200">';
  			var imgHtml = "<img  src='http://t2.baidu.com/it/u=2,819517188&fm=19&gp=0.jpg' height='200' width='200'>";
  			//document.getElementById("tdImg").innerHtml = imgHtml;
  			alert(document.getElementById("tdImg").innerHtml);
  			
  			var img1 = document.getElementById("img1");
  			img1.src = value;
  			img1.width = "100";
  			img1.height = "100";
  		}
  	</script>
  </head>
  
  <body>
  
    This is my HTML page. <br>
    <table>
    	<tr>
    		<td>
    			<input id="url">
    		</td>
    	</tr>
    	<tr>
    		<td> <input type="button" value="提交" onclick="setImage()"  /> </td>
    	</tr>
    	<tr>
    		<td id="tdImg" width="600" height="600">
    			<img id='img1'  src='http://t2.baidu.com/it/u=2,819517188&fm=19&gp=0.jpg' height='0' width='0'>
    		</td>
    	</tr>
    </table>
  </body>
</html>
